package Chapter8;
import java.io.*;
public class Example16 {
	public static void main(String[] args)throws Exception{
		PrintStream ps=new PrintStream(new FileOutputStream("printStream.txt"),true);
		Student stu=new Student();
		ps.print("This is a number.");
		ps.println(19);
		ps.println(stu);
	}

}
class Student{
	public String toString(){
		return "I am a student.";
	}
}